package com.sopaths.utility.collection;

import java.util.Map;

public class MapUtils {
	public static void merge(Map<? super Object, ? super Object> src, Map<?, ?> dest, MergeOption option) {
		for (Object key : dest.keySet()) {
			if (src.containsKey(key) && option == MergeOption.IGNORE) {
				continue;
			}
			src.put(key, dest.get(key));
		}
	}

	public enum MergeOption {
		OVERWRITE,
		IGNORE
	}
}
